Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TapoQuickResponseSelect to handle quick response options #814

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

cavefire
Copy link
Contributor

@cavefire cavefire commented Jan 9, 2025

This PR adds support for playing pre-recorded sounds on compatible devices (e.g., the D230 doorbell) by allowing users to select a sound for playback.

At this time, adding new sounds is only possible through the official Tapo app.

Note: This functionality requires JurajNyiri/pytapo#133 to be accepted and merged, as it provides the required methods.

@cavefire cavefire marked this pull request as ready for review January 9, 2025 08:42
@cavefire cavefire requested a review from JurajNyiri January 13, 2025 10:19
Copy link
Owner

@JurajNyiri JurajNyiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pytapo has been released at https://pypi.org/project/pytapo/3.3.38/.

Please note JurajNyiri/pytapo#133 (comment) .

C520WS responds with empty object, therefore we need to modify this so that it only adds select even if the response is empty.

Also, it is an object in C520WS, not a list, so we need to add a check there so that it does not throw an unexpected error.

Where in the app are these sounds set? How do they work? So that I can see if my C520WS supports that and what else it returns?

@JurajNyiri
Copy link
Owner

Disregard my previous comment, C520WS does return a truthy response, but does not contain quick_resp_audio, so the variable will be set to None.

@JurajNyiri
Copy link
Owner

Going to test this now.

@JurajNyiri
Copy link
Owner

https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/6.0.2 has been released containing a new pytapo version. After merging this, all still works as expected. Thank you!

@JurajNyiri JurajNyiri merged commit e5f7b66 into JurajNyiri:main Jan 13, 2025
@cavefire cavefire deleted the quick-response branch January 13, 2025 10:56
@JurajNyiri
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants